package com.yiyahui.project.erp.service.impl;

import java.util.List;
import com.yiyahui.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yiyahui.project.erp.mapper.YiyaDiagnoseMapper;
import com.yiyahui.project.erp.domain.YiyaDiagnose;
import com.yiyahui.project.erp.service.IYiyaDiagnoseService;

/**
 * 看诊Service业务层处理
 * 
 * @author yiyahui
 * @date 2020-05-16
 */
@Service
public class YiyaDiagnoseServiceImpl implements IYiyaDiagnoseService 
{
    @Autowired
    private YiyaDiagnoseMapper yiyaDiagnoseMapper;

    /**
     * 查询看诊
     * 
     * @param id 看诊ID
     * @return 看诊
     */
    @Override
    public YiyaDiagnose selectYiyaDiagnoseById(Long id)
    {
        return yiyaDiagnoseMapper.selectYiyaDiagnoseById(id);
    }

    /**
     * 查询看诊列表
     * 
     * @param yiyaDiagnose 看诊
     * @return 看诊
     */
    @Override
    public List<YiyaDiagnose> selectYiyaDiagnoseList(YiyaDiagnose yiyaDiagnose)
    {
        return yiyaDiagnoseMapper.selectYiyaDiagnoseList(yiyaDiagnose);
    }

    /**
     * 新增看诊
     * 
     * @param yiyaDiagnose 看诊
     * @return 结果
     */
    @Override
    public int insertYiyaDiagnose(YiyaDiagnose yiyaDiagnose)
    {
        yiyaDiagnose.setCreateTime(DateUtils.getNowDate());
        return yiyaDiagnoseMapper.insertYiyaDiagnose(yiyaDiagnose);
    }

    /**
     * 修改看诊
     * 
     * @param yiyaDiagnose 看诊
     * @return 结果
     */
    @Override
    public int updateYiyaDiagnose(YiyaDiagnose yiyaDiagnose)
    {
        yiyaDiagnose.setUpdateTime(DateUtils.getNowDate());
        return yiyaDiagnoseMapper.updateYiyaDiagnose(yiyaDiagnose);
    }

    /**
     * 批量删除看诊
     * 
     * @param ids 需要删除的看诊ID
     * @return 结果
     */
    @Override
    public int deleteYiyaDiagnoseByIds(Long[] ids)
    {
        return yiyaDiagnoseMapper.deleteYiyaDiagnoseByIds(ids);
    }

    /**
     * 删除看诊信息
     * 
     * @param id 看诊ID
     * @return 结果
     */
    @Override
    public int deleteYiyaDiagnoseById(Long id)
    {
        return yiyaDiagnoseMapper.deleteYiyaDiagnoseById(id);
    }
}
